// 基础函数实现
// ignore_for_file: unnecessary_null_comparison

bool isNoble(int atomicNumber) {
  return atomicNumber != null;
}

void enableFlags({required bool bold, required bool hidden}) {}

void enableFlags2({bool bold = false, bool hidden = false}) {}

String say(String from, String msg, [String? device]) {
  var result = '${from} says ${msg}';
  if (device != null) {
    result = '${result} with a ${device}';
  }
  return result;
}

String say2(String from, String msg, [String device = 'carrier pigeon']) {
  var result = '${from} says ${msg}';
  if (device != null) {
    result = '${result} with a ${device}';
  }
  return result;
}

void doStuff({
  List<int> list = const [1, 2, 3],
  Map<String, String> gifts = const {
    'first': 'paper',
    'second': 'cotton',
    'third': 'leather',
  },
}) {
  print('list: ${list}');
  print('gifts: ${gifts}');
}
